package com.geotmt.billingcenter.modules.cost.mapper;

import com.geotmt.billingcenter.common.entry.CostBaseHisEntry;
import com.geotmt.billingcenter.common.vo.cost.CostHisVo;
import com.geotmt.billingcenter.common.vo.params.ParamsCost;
import com.geotmt.billingcenter.common.vo.params.ParamsForDel;
import com.geotmt.billingcenter.modules.cost.mapper.provider.CostBaseHisProvider;
import org.apache.ibatis.annotations.*;

import java.util.Date;
import java.util.List;

/**
 * @Description 类描述
 * @Author      yanghanwei
 * @Mail        yanghanwei@geotmt.com
 * @Date        2019/3/20 12:18
 * @Version     v1
 **/
@Mapper
public interface CostBaseHisMapper {

    /**
     * cost add BaseHis
     * @param costBaseHis
     */
    @InsertProvider(type = CostBaseHisProvider.class, method = "add")
    void addBaseHis(CostBaseHisEntry costBaseHis);

    /**
     * cost delete baseHis
     * @param obj
     */
    @UpdateProvider(type = CostBaseHisProvider.class, method = "delete")
    void deleteBaseHis(ParamsForDel obj);

    /**
     * cost list baseHis
     * @param obj
     * @return
     */
    @SelectProvider(type = CostBaseHisProvider.class, method = "list")
    List<CostHisVo> listHis(ParamsCost obj);

    /**
     * 更新有效结束时间
     * @param preDay
     * @param id
     */
    @UpdateProvider(type = CostBaseHisProvider.class, method = "updateEndEffect")
    void updateEndEffect(@Param(value = "preDay") Date preDay,
                         @Param(value = "id") Integer id);
}
